Class EmailServerImpl

All Implemented Interfaces:
IPCObject, EmailServer, Process

public class EmailServerImpl extends ProcessImpl implements EmailServer
Information provided by the PKI file:

    \class EmailServer
    
    \brief EmailServer is the process that handles the email server.
    
    \example network().getDevice("Server0").getProcess("EmailServer")
    
Author:
Auto-generated
  • Constructor Details

  • Method Details

    • addUser

      public boolean addUser(String name, String password)
      Information provided by the PKI file:
      
          \brief Adds an email user with the specified username and password.
          
          \param name, the username for the email user.
          \param password, the password for the email user.
          
          \return bool, true if successful, otherwise false.
          
              
      Specified by:
      addUser in interface EmailServer
      Parameters:
      name - Takes in a parameter of name
      password - Takes in a parameter of password
      Returns:
      boolean Returns a boolean
    • deleteUser

      public boolean deleteUser(String name)
      Information provided by the PKI file:
      
          \brief Removes the email user with the specified username.
          
          \param name, the username of the email user of interest.
          
          \return bool, true if successful, otherwise false.
          
              
      Specified by:
      deleteUser in interface EmailServer
      Parameters:
      name - Takes in a parameter of name
      Returns:
      boolean Returns a boolean
    • changePassword

      public void changePassword(String name, String newpassword)
      Information provided by the PKI file:
      
          \brief Changes the password of the email user with the specifed username.
          
          \param name, the username of the email user of interest.
          \param newpassword, the new password for the email user.
          
              
      Specified by:
      changePassword in interface EmailServer
      Parameters:
      name - Takes in a parameter of name
      newpassword - Takes in a parameter of newpassword
    • getEmailUser

      public EmailUser getEmailUser(String username)
      Information provided by the PKI file:
      
          \brief Returns the email user with specified username.
          
          \param username, the username of the email user of interest.
          
          \return EmailUser, the EmailUser object with the specified username.
          
              
      Specified by:
      getEmailUser in interface EmailServer
      Parameters:
      username - Takes in a parameter of username
      Returns:
      EmailUser Returns a EmailUser
    • getAllEmailAcctAsStrings

      public List<String> getAllEmailAcctAsStrings()
      Information provided by the PKI file:
      
          \brief Adds an email user with the specified username and password.
          
          \return vector<string>, Return is all email accounts.  Each entry is in the format "name:password", like "jitu:jituPass".
          
              
      Specified by:
      getAllEmailAcctAsStrings in interface EmailServer
      Returns:
      List<String> Returns a List<String>
    • updateAllAccounts

      public void updateAllAccounts(String parm1)
      Information provided by the PKI file:
      
          \brief Updates passwords and adds user accounts based on the given formatted string.
          Format each entry as "name:password;".  So two entries would be formated as "name1:password1;name2:password2;"
          If a username exists, the password will be set.  If a username doesn't exist, the entry will be added.
          
              
      Specified by:
      updateAllAccounts in interface EmailServer
      Parameters:
      parm1 - Takes in a parameter of parm1